package com.sgb.kjwl.view.ui.adapter.enterprise;

import android.content.Context;
import android.view.View;

import com.sgb.kjwl.BR;
import com.sgb.kjwl.R;
import com.sgb.kjwl.interfaces.PublishRecyclerClick;
import com.sgb.kjwl.model.entity.enterprise.CompanyPublishEntity;
import com.sgb.kjwl.model.entity.enterprise.PropertyPublishEntity;
import com.sgb.kjwl.model.entity.enterprise.TrademarkPublishEntity;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;

import java.util.List;

public class PropertyPublishAdapter  extends BaseRecycleAdapter<PropertyPublishEntity> {

    PublishRecyclerClick<PropertyPublishEntity> mPublishEntityPublishRecyclerClick;

    public void setmPublishEntityPublishRecyclerClick(PublishRecyclerClick<PropertyPublishEntity> mPublishEntityPublishRecyclerClick) {
        this.mPublishEntityPublishRecyclerClick = mPublishEntityPublishRecyclerClick;
    }

    public PropertyPublishAdapter(Context context, List<PropertyPublishEntity> datas) {
        super(context, R.layout.item_make_over_publish_main_property, datas);
    }

    @Override
    public void convert(ItemViewHolder holder, PropertyPublishEntity talentEntity) {
        holder.setBinding(BR.entity, talentEntity);

        holder.getItem().findViewById(R.id.tv_item_make_over_publish_main_up_and_down).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mPublishEntityPublishRecyclerClick.recyclerClick(talentEntity);
            }
        });
    }
}
